<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<style>
table {
  border:1px solid #ccc;
	}
	table td, table th {
	  border-bottom: 1px solid #ccc;
	  border-right: 1px solid #ccc;
	  padding: 3px 5px;
	}
	
	table th {
	  text-align: center;
	}			
</style>

<div class="nav">
	<!--导航 Start-->
	<div class="menu" style="height: 0;">
		<div class="sideNavB" id="wrap-sort-all" style="display: flex;">
			<div class="sortMain">
				<div class="sortDiv" i="3" id="sortDiv3" style="border-right: none rgb(236, 236, 236); border-top-color: rgb(236, 236, 236); border-bottom: 2px solid rgb(236, 236, 236); border-left-color: rgb(236, 236, 236);">
					<div class="sLeft">
						<div class="sTitle"><i class="iconfont icon-remen"></i>热门</div>
					</div>
					<div class="sRight" id="cname1">
						<ul></ul>
					</div>
					<i class="iconfont sortArrow" style="display: block; color: rgb(153, 153, 153);">&#xe625;</i>
				</div>
				<div class="secondNav" id="rm" style="top: -2.5px;  display: none;">
					<ul></ul>
				</div>
			</div>
			<div class="sortMain">
				<div class="sortDiv" i="0" id="sortDiv0" style="border-right: 1px solid rgb(236, 236, 236); border-bottom: 1px solid rgb(236, 236, 236); border-top: 1px solid rgb(236, 236, 236); border-left-color: rgb(236, 236, 236);">
					<div class="sLeft">
						<div class="sTitle"><i class="iconfont icon-gaotongguolvqia"></i>高频彩</div>
					</div>
					<div class="sRight" id="cname2">
						<ul></ul>
					</div>
					<!-- <div class="clear"></div> -->
					<i class="iconfont sortArrow" style="display: block; color: rgb(153, 153, 153);">&#xe625;</i>
				</div>
				<div class="secondNav" id="gpc" style="top: -142px; display: none;">
					<ul></ul>
				</div>
			</div>
			<div class="sortMain">
				<div class="sortDiv" i="1" id="sortDiv1" style="border-right: 1px solid rgb(236, 236, 236); border-top-color: rgb(236, 236, 236); border-bottom-color: rgb(236, 236, 236); border-left-color: rgb(236, 236, 236);">
					<div class="sLeft">
						<div class="sTitle"><i class="iconfont icon-jiaoyifeidi"></i>低频彩</div>
					</div>
					<div class="sRight" id="cname3">
						<ul></ul>
					</div>
					<i class="iconfont sortArrow" style="display: block; color: rgb(153, 153, 153);">&#xe625;</i>
				</div>
				<div class="secondNav" id="low" style="display: none;">
					<ul></ul>
				</div>
			</div>

			<div class="sortMain">
				<div class="sortDiv" i="2" id="sortDiv2" style="border-right: 1px solid rgb(236, 236, 236); border-top: 1px solid rgb(236, 236, 236); border-bottom-color: rgb(236, 236, 236); border-left-color: rgb(236, 236, 236);">
					<div class="sLeft">
						<div class="sTitle"><i class="iconfont icon-quanbu"></i>全部</div>
					</div>
					<div class="sRight" id="cname4">
						<ul></ul>
					</div>
					<i class="iconfont sortArrow" style="display: block; color: rgb(153, 153, 153);">&#xe625;</i>
				</div>

				<div class="secondNav" id="all_lottery" style="top: -421px; display: none;">
					<ul></ul>
				</div>
			</div>
		</div>
	</div>
</div>

<main class="outline" id="container">
	<div class="main index">
		<div class="index_main">
			<div class="slide">
				<div class="index_banner" style="width:100%;height: 230px;"></div>
				<div class="notice">
					<i class="iconfont"></i>
					<marquee onmouseout="this.start()" onmouseover="this.stop()">重要通知：<span id="pc_notice"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</marquee>
				</div>
				<div class="index_box_tz">
					<div class="left tz_box">
						<div class="tz_box_main" id="tz_box_main">
							<ul class="tz_box_tab" id="tz_box_tab">
								<h1>快速投注</h1>
								<div class="tz_tab" id="bf_lotter">
									<ul></ul>
								</div>
							</ul>
							<div class="show_box_main" id="show_box_main">
								<div class="tz_item" style="display: block;">
									<div class="t">
										<div class="left view_qi" id='currentLotters'> </div>
									</div>
									<div class="list qiu_box">
										<div class="random_nums">
										</div>
									</div>
									<div class="foot">
										<div class="fun left">
											<a class="wanfa" id="wanfa">
												<i class="iconfont rules icon-guize1"></i>
												<span>玩法规则</span>
											</a>
										</div>
										<div class="fun left">

											<a class="wanfa" id="zoushi">
												<i class="iconfont trend icon-icon-test"></i>
												<span>号码走势</span>
											</a>
										</div>
										<div class="left add">
											<span class="plus">+</span>
											<input value="1" type="number" oninput="if(value.length>6)value=value.slice(0,6)" class="plus_value">
											<span class="sub">-</span>
										</div>
										<div class="left mulriple"> 倍，共 <span class="red bet_money">2</span> 元
										</div>
										<div class="right">
											<!--   <a class="rf" countnumber="3" >
	                                      <i class="iconfont" style="font-size: 1.5rem;color: #e94335;">&#xe7de;</i>
	                                  </a> -->
											<a class="btn btn-default touzhu lijitozhu" lid="16">
												<i class="iconfont" style="font-size: 1.5rem;color: #e94335;">&#xe7de;</i> 立即投注
											</a>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="home-notice main">
			<span>欢迎光临</span>
			<span>扫码下载APP惊喜更多噢</span>
		</div>
		<div class="recommend">
			 <div class="special-title"><i></i><span>为您推荐</span><i></i></div>
			<div class="list">
				<div class="slick-initialized slick-slider slider">
					<i class="slick-arrow slick-prev  iconfont icon-arrowright" data-role="none" style="display: block;">&#xe62a;</i>
					<div class="slick-list">
						<div class="slick-track" style="opacity: 1; transform: translate3d(0px, 0px, 0px); width: 5000px;">
							<ul></ul>
						</div>
					</div>
					<i class="slick-arrow slick-next iconfont icon-arrowright" data-role="none" style="display: block;">&#xe625;</i>
				</div>
			</div>
		</div>
		<div class="index">
			<div class="special-title"><i></i><span>开奖公告／用户中奖榜</span><i></i></div>
			<div class="index_box_main main">
				<div class="left kj">
					<div class="head">
						<span> 彩种 </span>
						<span>操作  </span>
					</div>
					<div class="kjmain"> </div>
				</div>
				<div class="left phb">
					<!-- <div class="head">
                <i class="iconfont"></i> 中奖排行榜
            </div> -->
					<div class="sub_head">
						<em>用户名</em>
						<em>奖金</em>
					</div>
					<div class="win_list"><ul></ul></div>
				</div>
				<div class="mobile-QR-code">
					<div>
						<div class="qr-code">
							<img alt="iosQRcode" class="IphoneA" src="/d/cp/${app.ios_img}"></div>
						<div class="label"><i class="iconfont ios-icon">&#xe603;</i><span>Iphone版</span></div>
					</div>
					<div>
						<div class="qr-code">
							<img alt="androidQRcode" class="AndroidA" src="/d/cp/${app.android_img}"></div>
						<div class="label"><i class="iconfont">&#xe661;</i><span>Android版</span></div>
					</div>
				</div>
			</div>
		</div>
	</div>
</main>
	
<script type="text/javascript">
	var timer
	var error=[] /* 用来存禁用启用的数组 */
	$.ajax({
		type: "post",
		url: "/findUserNotices.do",
		success: function(data) {
			var html="";
			var newData = data.data
			for(i = 0; i < newData.length; i++) {
				html += newData[i].contents +"\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0";
			}
			$("#pc_notice").text(html);
		}
	})
	
	
	$.ajax({
		url: "/pc/homePageDataPc.do",
		type: "post",
		data: {},
		success: function(data) {
			/* 动态添加轮播图 */
			$(".index_banner").empty()
			var html=""
			var html1=""
			html+="<div class='swiper-container'>"+	
				"<div class='swiper-wrapper'></div>"+
				"<div class='swiper-pagination'></div>"+
				"<div class='swiper-button-next' tabindex='0' role='button' aria-label='Next slide'></div>"+
				"<div class='swiper-button-prev' tabindex='0' role='button' aria-label='Previous slide'></div>"+
			"</div>"
			$(".index_banner").append(html)
			 for (var i = 1; i < 6; i++) {
				var picItem = data.data1["picturePath" + i]
				 if (picItem == "") {
					continue
				} 
				html1+="<div class='swiper-slide'><img src='/d/cp/" + picItem + "' width='704' height='230' alt=''></div>"
			}	
			$(".swiper-wrapper").append(html1)
			$(".zs_left .qr img").attr("src","/d/cp/"+data.data.android_img)
			$(".zs_right .qr img").attr("src","/d/cp/"+data.data.ios_img)
			$(".home-notice").css("background-image","url('/d/cp/"+data.data.pc_img+"')");
			$(".mobile-QR-code .IphoneA").attr("src","/d/cp/"+data.data.ios_img)
			$(".mobile-QR-code .AndroidA").attr("src","/d/cp/"+data.data.android_img)
			
			/* 轮播图切换 */
			var swiper = new Swiper('.swiper-container', {
			    slidesPerView: 1,
			    loop: true,
			    autoplay:true,
			    speed:100,
			    disableOnInteraction: false,
			    pagination: '.swiper-pagination',
			    pagination: {
			      el: '.swiper-pagination',
			      clickable: false,
			    },
			    navigation: {
			      nextEl: '.swiper-button-next',
			      prevEl: '.swiper-button-prev',
			    },
			});
			$('.swiper-container').mouseenter(function () {
			swiper.autoplay.stop();
			})
			$('.swiper-container').mouseleave(function () {
			swiper.autoplay.start();
			})
			
			$(".secondNav ul").empty();  /* 进来先清空高频彩、低频彩、热门和全部彩种的数据的 */
			$('.slick-track ul').empty();  //展示为您推荐彩种的数据
			$('#bf_lotter ul').empty();
			$('#currentLotters').empty();
			var datas=data.data2
			for(i=0;i<datas.length;i++){
				var item=datas[i]
				
				if(i<3){
					$('#bf_lotter ul').append("<li class='"+item.cname+"'><span style='display:none' class="+item.cname+"nextperiod>"+item.nextperiod+"</span>"+item.gameNameInChinese+"</li>")
				}
				if(item.cname!='bjl'){
					var html2=""
					if(item.colorStatus==0){
						error.push(item.cname)
					}
						
					if(item.classify==1){  /* 热门彩 */
						lotterDatas("#cname1","#rm",item)
					}else if(item.classify==2){  /* 高频彩 */
						lotterDatas("#cname2","#gpc",item)
					}else if(item.classify==3){  /* 低频彩 */
						lotterDatas("#cname3","#low",item)
					}
					lotterDatas("#cname4","#all_lottery",item)/* 全部彩种 */
					html2+="<div data-index='"+i+"' class='slick-slide  slick-active' tabindex='-1' aria-hidden='false' style='outline: none;'>"
					        +"<div class='lottery-cell'><div class='normal'>"
					 if(item.colorStatus==0){
						 html2+="<img src=/img/caizhong/gray_"+item.cname+".png>"; 
					 }else{
						 html2+="<img src=/img/caizhong/"+item.cname+".png>"; 
					 }
					        html2+="<span>"+item.gameNameInChinese+"</span></div>"    
					        +"<div class='active' style='display: none'>"
					        + "<button class='curDraw' attr-cname="+item.cname+"> 近期开奖</button>"
					if(item.colorStatus==0){
						html2+="<a onclick='lotterDisable()'><button class='touzhu "+item.cname+"' >投注</button></a></div></div></div>";
					}else{
						html2+="<a onclick='goLotterPage(\""+item.cname+"\")'><button class='touzhu "+item.cname+"' >投注</button></a></div></div></div>";
					}
					$('.slick-track ul').append(html2) 
				}else if(item.cname=='bjl'){
					if(item.colorStatus==0){
						bjlFlag=0;
					}else{
						bjlFlag=1;
					}
				}
			}
			
			/* 中奖数据 */
			$('.win_list ul').empty();
			for(var i in data.data3){
		    	$('.win_list ul').append("<li><div><span class='number'>"+i+"</span><span class='username'>"+data.data3[i].huiyuanzh+"**</span></div><em class='red'>"+data.data3[i].goalmoney+"元</em></li>"); 
		    }
			cname=data.data2[0].cname;
		    var oneData=data.data2[0];
			if(oneData.cname!="bjl"){
	    	    var fnextPeriod =oneData.nextperiod
				var nextPeriod = $("."+cname+"nextperiod").text()//页面期号
				var d = oneData.lotternumber
				if(fnextPeriod >= nextPeriod){
					clearInterval(timer)
					$(".index_box_tz .issure").text(fnextPeriod)//下期期号
					var curTime=new Date(data.message).getTime(); //当前系统毫秒时间
					var nextTime=new Date(oneData.nextStopOrderTimeEpoch).getTime();//下棋开奖时间
					var daojishi =(nextTime-curTime)/1000;  //倒计时时间
					timer = setInterval(function DaoJiShi(){
						if($("#wrap-sort-all").length==0){
							clearInterval(timer)
							return;
						}
					 	var h = parseInt(daojishi/ 60 / 60 % 60) //时
					    var m = parseInt(daojishi/ 60 % 60)  //分
					 	var s = parseInt(daojishi% 60)  //秒
					 	daojishi--;
					 	if(h <= 0 && m <= 0 && s < 0){    //小于等于0时可能时正在开奖也可能是没开爬数据
					 		if(s%3==0){
					 			lotterData(cname)
					 		}
							$(".t .restTime1 .hh").text("00")
							$(".t .restTime1 .mm").text("00")
							$(".t .restTime1 .ss").text("00") 
						}else{
							if(h < 10){
								h = "0"+h
							}
							if(m < 10){
								m = "0"+m
							}
							if(s < 10){
								s = "0"+s
							}
							$(".t .restTime1 .hh").text(h)
							$(".t .restTime1 .mm").text(m)
							$(".t .restTime1 .ss").text(s)
						}
					 }, 1000);
				}
				var x="";
				if(d!=null){  //没有爬到数据
					d=d.split(",")
					if(d.length > 1){
						$(".qiu_box .random_nums").html("");
						for(i=0;i<d.length-1;i++){
							if(oneData.cname=="2fpk10" || oneData.cname=="bjpk10"  || oneData.cname=="xysm"  || oneData.cname=="xyft"){
								x+="<div class='ball-wrap qiu"+Number(d[i])+"'>"+d[i]+"</div>"
							} else if(oneData.cname=="xg6hc" || oneData.cname=="5f6hc"){
								if(i==d.length-2){
									x+="<div style='font-size:16px;font-weight:bold;color:black'>+</div>";
								}
								x+="<div class='ball-wrap xg"+Number(d[i])+"'>"+d[i]+"</span>"
							} else if(oneData.cname=="ahk3" || oneData.cname=="gxk3" || oneData.cname=="jsk3" || oneData.cname=="3fk3" || oneData.cname=="bjk3"){
								x+="<div class='ball-wrap sz"+d[i]+"'></div>"
							}else{
								x+="<div class='ball-wrap qiu8'>"+d[i]+"</div>"
							} 
						} 
						$(".qiu_box .random_nums").append(x);
					}else{
						$(".qiu_box .random_nums").html("<span style='display:flex;width:200px;justify-content: space-around;align-items: center;'><span class='kaijiang'>正</span><span class='kaijiang'>在</span><span class='kaijiang'>开</span><span class='kaijiang'>奖</span></span>")
					}  
				}
			}
			var span = " 第<span class='issure'>"+datas[0].period+"</span>期截止 <div lottertid='1' class='restTime1'>"+
			 "<span class='hh'>00</span>"+
				"<div class='splice'></div>"+
			"<span class='mm'>00</span>"+
			 	"<div class='splice'></div>"+
			"<span class='ss'>00</span></div>"	
			$('#currentLotters').html(span);
			$('.kjmain').empty();
			var div1 ='';
			for(var i=0;i<5;i++){
				var lotterNum = datas[i].lotternumber.split(',');
				div1+="<div class='item'><div class='top'><em>"+datas[i].gameNameInChinese+"</em><div>"+datas[i].lottertime+"</div><span>"+datas[i].period+"期</span></div><div class='med'><div>";
				for(var j in lotterNum){
					div1+="<span class='red '>&nbsp;"+lotterNum[j]+"</span>";
				}
				
				div1+="</div><div class='bott'><div class='right "+datas[i].cname+"'> <a data-link='/pc/drawdetail.do?cname="+datas[i].cname+"'>详细</a>"
					+"<a class='zoushi' data-link='/pc/trendChart.do?cname="+datas[i].cname+"'  >走势<a class='touzhu' data-link="+datas[i].cname+"' >投注</a></div></div></div></div>";
			}
			$('.kjmain').html(div1);
			
			
			
			
			
			/* 移入移除 为您推荐的单彩种变化*/
			 $(".slick-list .slick-slide").mouseover(function (){    
	            $(this).find(".lottery-cell").find(".active").show()  
	         }).mouseout(function(){  
	       	    $(this).find(".lottery-cell").find(".active").hide()     
	         });
			
			/* 点击为您推荐 */
	 	 	$(".slick-list .slick-slide .curDraw").on("click",function(){
				cname=$(this).attr("attr-cname")
				if(error.indexOf(cname)!=-1){
					bindLayerLittle("温馨提示","该彩种维护中,暂未开放")
				}else{
					loadPage('/pc/drawdetail.do')
				}
			}) 
			
			/* 开奖公告的详细，走势，投注 */
			$(".kjmain a").on("click",function(){
				var lotterName=$(this).parent().attr("class").split(" ")[1]
				if($(this).hasClass("zoushi")){
					loadPage($(this).attr("data-link")) 
				}else{
					 if(error.indexOf(lotterName)!=-1){
						bindLayerLittle("温馨提示","该彩种维护中,暂未开放")
					}else{
						if($(this).hasClass("touzhu")){
							goLotterPage(lotterName)
						}else{
							loadPage($(this).attr("data-link")) 
						}
					} 
			 }
			})
			
			$('#bf_lotter ul li').eq(0).addClass("active")
			$("#bf_lotter li").on("click",function(){
				$(this).addClass("active").siblings("li").removeClass("active")
				cname=$("#bf_lotter").find(".active")[0].className.split(" ")[0]
				 lotterData(cname)
			})
			
			$("#wanfa").on("click",function(){
				if(error.indexOf(cname)!=-1){
					bindLayerLittle("温馨提示","该彩种维护中,暂未开放")
				}else{
					loadPage('/pc/rule.do?cname='+cname)
				}
				
			})

			//走势
			$("#zoushi").on("click",function(){
				
adPage('/pc/trendChart.do?cname'+cname)
			})
		}
	})
	 var index=0
	 var distance
	 
	 /* 为你推荐上下翻页 */
	 $(".slick-initialized .slick-prev").on("click",function(){   
		 index--
		 if(index<0){
			 index=18
		 }
		 distance=index*(-155)
		 $(".slick-track").css("transform","translate3d("+distance+"px, 0px, 0px)")
	 })
	 
	  $(".slick-initialized .slick-next").on("click",function(){
		  index++
		  if(index>18){
			  index=0
		  }
		  distance=index*(-155)
		  $(".slick-track").css("transform","translate3d("+distance+"px, 0px, 0px)")
	 })
	 


	
	var timer
	var state = true
	function lotterData(cname){   //拿下期的数据进行渲染
		$.ajax({
			url: "/findNextNextPeriod.do",
			type: "post",
			data: {
				"cname":cname,
				"type":1
			},
			success: function(data) {
				 clearInterval(timer)
				 if(cname=="bjl"){
					 return;
				 }
				var fnextPeriod = data.data.nextperiod
				var nextPeriod = $("."+cname+"nextperiod").text() //页面期号
				var newData=data.data
				var d =  data.data.lotternumber//开奖号码
				if(fnextPeriod >= nextPeriod){
					$(".index_box_tz .issure").text(fnextPeriod)//下期期号
					var curTime=new Date(data.message).getTime(); //当前系统毫秒时间
					var nextTime=new Date(data.data.nextStopOrderTimeEpoch).getTime();//下棋开奖时间
					var daojishi =(nextTime-curTime)/1000;  //倒计时时间
					timer = setInterval(function DaoJiShi(){
						if($("#wrap-sort-all").length==0){
							clearInterval(timer)
							return;
						}
					 	var h = parseInt(daojishi/ 60 / 60 % 60) //时
					    var m = parseInt(daojishi/ 60 % 60)  //分
					 	var s = parseInt(daojishi% 60)  //秒
					 	daojishi--;
					 	if(h <= 0 && m <= 0 && s < 0){    //小于等于0时可能时正在开奖也可能是没开爬数据
					 		if(s%3==0){
					 			lotterData(cname)
					 		}
							$(".t .restTime1 .hh").text("00")
							$(".t .restTime1 .mm").text("00")
							$(".t .restTime1 .ss").text("00") 
						}else{
							if(h < 10){
								h = "0"+h
							}
							if(m < 10){
								m = "0"+m
							}
							if(s < 10){
								s = "0"+s
							}
							$(".t .restTime1 .hh").text(h)
							$(".t .restTime1 .mm").text(m)
							$(".t .restTime1 .ss").text(s)
						}
					 }, 1000);
				}
				var x="";
				if(d==null){  //没有爬到数据
					return;
				}
				d=d.split(",")
				if(d.length > 1){
					$(".qiu_box .random_nums").html("");
					for(i=0;i<d.length-1;i++){
						if(newData.cname=="2fpk10" || newData.cname=="bjpk10"  || newData.cname=="xysm"  || newData.cname=="xyft"){
							x+="<div class='ball-wrap qiu"+Number(d[i])+"'>"+d[i]+"</div>"
						} else if(newData.cname=="xg6hc" || newData.cname=="5f6hc"){
							if(i==d.length-2){
								x+="<div style='font-size:16px;font-weight:bold;color:black'>+</div>";
							}
							x+="<div class='ball-wrap xg"+Number(d[i])+"'>"+d[i]+"</span>"
						} else if(newData.cname=="ahk3" || newData.cname=="gxk3" || newData.cname=="jsk3" || newData.cname=="3fk3" || newData.cname=="bjk3"){
							x+="<div class='ball-wrap sz"+d[i]+"'></div>"
						}else{
							x+="<div class='ball-wrap qiu8'>"+d[i]+"</div>"
						} 
					} 
					$(".qiu_box .random_nums").append(x);
				}else{
					$(".qiu_box .random_nums").html("<span style='display:flex;width:200px;justify-content: space-around;align-items: center;'><span class='kaijiang'>正</span><span class='kaijiang'>在</span><span class='kaijiang'>开</span><span class='kaijiang'>奖</span></span>")
				}
			}
		})
	}
	
	//鼠标悬停显示不同的彩种类型
	$(".sortMain").mouseover(function() {
		 $(".menu #wrap-sort-all").css("height","563px")
						var e = $(this).find(".sortDiv").attr("i");
						2 == e && (e = -421, $(".sideNavB .sortDiv").css("border-right", "1px solid #96cbea"), $(this).find("#sortDiv2").css({
								borderTop: "1px solid #96cbea",
								borderRight: "none"
							})), 3 == e && (e = -2.5, $(".sideNavB .sortDiv").css("border-right", "1px solid #96cbea"), $(this).find("#sortDiv3").css({
								borderBottom: "2px solid #96cbea",
								borderRight: "none"
							})),  1 == e &&
						(e=-282,$(".sideNavB .sortDiv").css("border-right", "1px solid #96cbea"),$(this).find("#sortDiv1").css({
								borderBottom: "1px solid #96cbea",
								borderRight: "none"
							})),
							
						0 == e && (e = -142, $(".sideNavB .sortDiv").css("border-right", "1px solid #96cbea"), $(this).find("#sortDiv0").css({
							borderBottom: "1px solid #96cbea",
							borderRight: "none"
						}), $(this).find("#sortDiv0").css({
							borderTop: "1px solid #96cbea"
						})), $(this).find(".sortArrow").css("color", "#3b416f"), $(this).siblings().find(".secondNav").hide(), $(this).find(".secondNav").show().css("top", e)
					}), $(".sortMain").mouseout(function() {
						$(this).find(".secondNav").hide(), $(this).find(".sortArrow").css("color", "#999"), $(".sortDiv").css("border-color", "#ececec"),
						 $(".menu #wrap-sort-all").css("height","565px")
					})
	
	
	 var price=2
var monye = $(".plus_value").val()
$(".plus").on("click",function(){
	monye++
	price=2*monye
	$(".bet_money").text(2*monye)
	$(".plus_value").val(monye)
})
$(".sub").on("click",function(){
	if(monye >= 2){
		monye--
	}
	price=2*monye
	$(".bet_money").text(2*monye)
	$(".plus_value").val(monye)
})


 $(".plus_value").bind("input propertychange",function(){
	var count=$(".plus_value").val()
	if(count<1){
		$(".plus_value").val("")
		count=1
	}
	price=2*count
	$(".mulriple .bet_money").text(price)
})
$(".plus_value").on("blur",function(){
	if($(".plus_value").val()==""){
		$(".plus_value").val(1)
	}
})
 $(".lijitozhu").on("click",function(){
	var name=$(".tz_box .tz_tab li").siblings(".active")[0].className.split(" ")[0];
	console.log(error,name)
	if(error.indexOf(name)!=-1){
		bindLayerLittle("温馨提示","该彩种维护中,暂未开放")
	}else{
		if(loginState==0){
			bindLayerLittle("提示：", "请先登录")
		}else{
			window.location.href="/pc/touzhu.do?cname="+name+"&price="+price+""
		}
	}
}) 				
					
	/* 彩种数据渲染 */
	function lotterDatas(id1,id2,item){
		if($(id1+' ul li').length<4){
			if(item.colorStatus==0){/* 禁用 */
				$(id1+' ul').append('<li onclick="lotterDisable()"><img src=/img/caizhong/gray_'+item.cname+'.png></img><a >'+item.gameNameInChinese+'</a></li>')
			}else{
				$(id1+' ul').append('<li><img src=/img/caizhong/'+item.cname+'.png></img><a onclick="goLotterPage(\''+item.cname+'\')">'+item.gameNameInChinese+'</a></li>')
			}
		}
		if(item.colorStatus==0){/* 禁用 */
			$(id2+' ul').append('<li onclick="lotterDisable()"><img src=/img/caizhong/gray_'+item.cname+'.png></img><a >'+item.gameNameInChinese+'</a></li>')
		}else{
			$(id2+' ul').append('<li><img src=/img/caizhong/'+item.cname+'.png></img><a onclick="goLotterPage(\''+item.cname+'\')">'+item.gameNameInChinese+'</a></li>')
		}
		
	}
	
	/* 提示该彩种已禁用的方法 */
	function lotterDisable(){
		bindLayerLittle("温馨提示","该彩种维护中,暂未开放")
	}
	
	
	

	
	
</script>
